@import '../../../../../stylesheets/variables';
@import '../../../../../stylesheets/colors';
@import '../../../../../stylesheets/mixins';

.export-analysis-section {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.export-analysis-section__topbar {
  display: flex;
  align-items: center;
  position: relative;
}

.export-analysis-section__progress-container {
  @include font-size-sm;

  width: 100%;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: $raven;
  margin-bottom: $global-spacing * 2;
}

.export-analysis-section__subtext {
  @include font-size-xs;
  color: $raven;
  text-align: center;
  max-width: $max-content-width;
  line-height: 1.5;
  margin: $global-spacing auto 0;
}

.export-analysis-section__infotext {
  margin-top: -$global-spacing * 1.5;
}

.export-analysis-section__dont-break {
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  break-inside: avoid;
}

.export-analysis-section__list {
  @include horizontal-scroll-overflow-indicators;
  position: relative;
  column-width: $global-spacing * 25;
  column-gap: $global-spacing;
  padding: 0;
  max-height: 80vh;
  margin: 0;
  list-style-type: none;
  overflow-y: scroll;
  height: 100%;
  margin-top: $global-spacing * 3;
}

.export-analysis-section__filter-input-container {
  position: absolute;
  margin-right: auto;
  right: 0;

  @media screen and (max-width: 48em) {
    display: none;
  }
}

.export-analysis-section__filter-input-search-icon {
  position: absolute;
  right: $global-spacing;
  z-index: 1;
  top: 0;
  bottom: 0;
  margin: auto;
  width: $global-spacing * 1.5;
  height: $global-spacing * 1.5;

  path {
    stroke: #666;
    stroke-width: 3px;
  }
}

.export-analysis-section__filter-input {
  @include font-size-sm;
  font-family: $font-family-code;
  padding-right: $global-spacing * 3;
  width: 15vw;
  transition: all 0.1s ease-in-out;
  will-change: transform;
  contain: strict;
  border: 1px solid lighten($raven, 51%);
  background: lighten($raven, 51%);

  &:focus {
    width: 23vw;
    background: white;
    border: 1px solid lighten($raven, 48%);
  }
}

.export-analysis-section__pill {
  @include font-size-sm;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: $global-spacing;
  margin-top: 0; //$global-spacing / 1.5;
  margin-bottom: 0; //$global-spacing / 1.5;
  position: relative;
  z-index: 0;

  &::after {
    content: '';
    background: lighten($raven, 52%);
    position: absolute;
    bottom: 0;
    height: 1px;
    width: 100%;
    left: 0;
    z-index: -2;
  }
}

.export-analysis-section__pill-fill {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  border-radius: inherit;
  z-index: -1;
  width: 100%;
  transition: transform 0.4s cubic-bezier(0.635, 0.1, 0, 1.34);
  transform-origin: 0 50%;
}

.export-analysis-section__pill-fill--low-1 {
  background: lighten(#7ebf80, 15%);
}

.export-analysis-section__pill-fill--low-2 {
  background: lighten(#9bc26b, 15%);
}

.export-analysis-section__pill-fill--med-1 {
  background: lighten(#dee675, 10%);
}

.export-analysis-section__pill-fill--med-2 {
  background: lighten(#fff080, 0%);
}

.export-analysis-section__pill-fill--med-3 {
  background: lighten(#ffd966, 5%);
}

.export-analysis-section__pill-fill--high-1 {
  background: lighten(#ffbf66, 10%);
}

.export-analysis-section__pill-fill--high-2 {
  background: lighten(#ff8a66, 15%);
}

.export-analysis-section__pill-name {
  font-family: $font-family-code;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.export-analysis-section__pill-spinner {
  border-radius: 50%;
  height: $global-spacing;
  width: $global-spacing;
  background: rgba(0, 0, 0, 0.1);
  animation: pule-pill-spinner 0.5s alternate infinite;
}

@keyframes pule-pill-spinner {
  from {
    transform: scale(0.1);
  }
  to {
    transform: scale(1);
  }
}

.export-analysis-section__pill-size {
  @include font-size-xs;
}

.export-analysis-section__pill-size-unit {
  color: $raven;
  font-size: 90%;
  margin-left: $global-spacing * 0.2;
}

.export-analysis-section__letter-heading {
  @include font-size-md;
  margin: $global-spacing * 1.5 0 $global-spacing;
}

.export-analysis-section__error {
  margin: auto;
  text-align: center;

  h4 {
    font-family: $font-family-code;
    margin-bottom: 0;
  }

  p {
    @include font-size-sm;
    color: $raven;
  }
}
